package ytdp.careagle.com.ytdp.mvp.mode;

import android.content.Context;

import java.util.HashMap;
import java.util.Map;

import ytdp.careagle.com.ytdp.app.G;
import ytdp.careagle.com.ytdp.entity.BaseConfig;
import ytdp.careagle.com.ytdp.entity.BrandRelationship;
import ytdp.careagle.com.ytdp.entity.ModelRelationship;
import ytdp.careagle.com.ytdp.entity.ProvinceEntity;
import ytdp.careagle.com.ytdp.entity.PushCarEntity;
import ytdp.careagle.com.ytdp.entity.QueryAllCarType;
import ytdp.careagle.com.ytdp.entity.SellCarProgramEntity;
import ytdp.careagle.com.ytdp.entity.SeriesRelationship;
import ytdp.careagle.com.ytdp.entity.ValuationQuery;
import ytdp.careagle.com.ytdp.entity.VehicleSeries;
import ytdp.careagle.com.ytdp.net.MyObserver;
import ytdp.careagle.com.ytdp.net.NetWorks;
import ytdp.careagle.com.ytdp.net.Result;
import ytdp.careagle.com.ytdp.net.Results;

/**
 * Created by admin on 2017/9/21.
 */

public class CarEvaluateModel {
    public void getBrandRelationship(Context context, Map<String, String> header, MyObserver<Results<BrandRelationship>> call) {
        NetWorks.getInstance().getBrandRelationship(context, header, call);
    }

    public void getList2Data(Context context, String brandCode, MyObserver<Results<SeriesRelationship>> myObserver) {
        HashMap<String, String> map = new HashMap<>();
        map.put("brandCode", brandCode + "");
        NetWorks.getInstance().getSeriesRelationship(context, G.getHeader(context), map, myObserver);
    }

    public void getModelRelationship(Context context, Map<String, String> header, HashMap<String, String> map, MyObserver<Results<ModelRelationship>> observer) {
        NetWorks.getInstance().getModelRelationship(context, header, map, observer);
    }

    public void getLocalProvinceCity(Context context, Map<String, String> header, MyObserver<Results<ProvinceEntity>> observer) {
        NetWorks.getInstance().getLocalProvinceCity(context, header, observer);
    }

    public void queryValuationQuery(Context context, Map<String, String> header, HashMap<String, String> map, MyObserver<Result<ValuationQuery>> myObserver) {
        NetWorks.getInstance().queryValuationQuery(context, header, map, myObserver);
    }

    public void findByModelCode(Context context, Map<String, String> header, HashMap<String, String> map, MyObserver<Result> myObserver) {
        NetWorks.getInstance().findByModelCode(context, header, map, myObserver);
    }

    public void getBannerData(Context context, Map<String, String> header, MyObserver<Results<VehicleSeries>> myObserver) {
        NetWorks.getInstance().getBanner(context, header, myObserver);
    }

    public void findVehicleSeriesByResidualvalue(Context context, Map<String, String> header, HashMap<String, String> map, MyObserver<Result<PushCarEntity>> myObserver) {
        NetWorks.getInstance().findVehicleSeriesByResidualvalue(context, header, map, myObserver);
    }

    public void getBasicConfig(Context context, Map<String, String> header, MyObserver<Result<BaseConfig>> myObserver) {
        NetWorks.getInstance().getBasicConfig(context, header, myObserver);
    }

    public void findVehicleByVehicleSeriesAndOnline(Context context, Map<String, String> header, String vehicleSeriesId, MyObserver<Results<SellCarProgramEntity>> myObserver) {
        HashMap<String, String> map = new HashMap<>();
        map.put("vehicleSeriesId", vehicleSeriesId);
        NetWorks.getInstance().findVehicleByVehicleSeriesAndOnline(context, header, map, myObserver);
    }

    public void queryAllCar(Context context, Map<String, String> header, MyObserver<Results<QueryAllCarType>> myObserver) {
        NetWorks.getInstance().listVehicleSeriesByShop(context, header, myObserver);
    }
}
